/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package negocio;

import Presentacion.Hora;
import integracion.ActividadDAO;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.LinkedList;
import java.util.List;
import util.Util;

/**
 *
 * @author Jonatan Elias
 */
public class ServicioSemanaImplementacion implements ServicioSemana{

    public ActividadDAO actividadDao;

    public ActividadDAO getActividadDao() {
        return actividadDao;
    }

    public void setActividadDao(ActividadDAO actividadDao) {
        this.actividadDao = actividadDao;
    }

    @Override
    public List<Hora> getSemana(Date fecha) {

        Date init = Util.getPreviousMonday(fecha);
        Date end  = Util.getNextSunday(fecha);

        //List<Actividad> actividadesSemana = this.getActividadesInSpan(init, end, actividadDao.getByFechas(init, end));





        LinkedList<Hora> horas = new LinkedList<Hora>();
        horas.add(new Hora("7:00","","","","","","",""));
        horas.add(new Hora("7:30","","","","","","Servicio Social",""));
        horas.add(new Hora("8:00","","","Diseño y Arquitectura de Software","","","Servicio Social",""));
        horas.add(new Hora("8:30","","","Diseño y Arquitectura de Software","","","Servicio Social",""));
        horas.add(new Hora("9:00","","","Diseño y Arquitectura de Software","","","Servicio Social",""));
        horas.add(new Hora("9:30","","","Diseño y Arquitectura de Software","","","Servicio Social",""));
        horas.add(new Hora("10:00","Administración de Proyectos de TI","Bases de Datos Avanzadas","Servicio Becario","Administración de Proyectos de TI","Bases de Datos Avanzadas","Servicio Social",""));
        horas.add(new Hora("10:30","Administración de Proyectos de TI","Bases de Datos Avanzadas","Servicio Becario","Administración de Proyectos de TI","Bases de Datos Avanzadas","Servicio Social",""));
        horas.add(new Hora("11:00","Administración de Proyectos de TI","Bases de Datos Avanzadas","","Administración de Proyectos de TI","Bases de Datos Avanzadas","Servicio Social",""));
        horas.add(new Hora("11:30","Servicio Becario","Servicio Becario","","Servicio Becario","Servicio Becario","Servicio Social",""));
        horas.add(new Hora("12:00","Servicio Becario","Servicio Becario","","Servicio Becario","Servicio Becario","",""));
        horas.add(new Hora("12:30","","","","","","",""));
        horas.add(new Hora("13:00","","","","","","",""));
        horas.add(new Hora("13:30","","","","","","",""));
        horas.add(new Hora("14:00","","","","","","",""));
        horas.add(new Hora("14:30","","Sistemas Inteligentes","","","Sistemas Inteligentes","",""));
        horas.add(new Hora("15:00","","Sistemas Inteligentes","","","Sistemas Inteligentes","",""));
        horas.add(new Hora("15:30","","Sistemas Inteligentes","","","Sistemas Inteligentes","",""));
        horas.add(new Hora("16:00","","Responsabilidad Social","","","Responsabilidad Social","",""));
        horas.add(new Hora("16:30","","Responsabilidad Social","","","Responsabilidad Social","",""));
        horas.add(new Hora("17:00","","Responsabilidad Social","","","Responsabilidad Social","",""));
        horas.add(new Hora("17:30","","","","","","",""));
        horas.add(new Hora("18:00","","","","","","",""));
        horas.add(new Hora("18:30","","","","","","",""));
        horas.add(new Hora("19:00","","","","Diseño y Arquitectura de Software","","",""));
        horas.add(new Hora("19:30","","","","Diseño y Arquitectura de Software","","",""));
        horas.add(new Hora("20:00","","","","Diseño y Arquitectura de Software","","",""));
        horas.add(new Hora("20:30","","","","Diseño y Arquitectura de Software","","",""));
        horas.add(new Hora("21:00","","","","Diseño y Arquitectura de Software","","",""));
        horas.add(new Hora("21:30","","","","Diseño y Arquitectura de Software","","",""));
        horas.add(new Hora("22:00","","","","","","",""));
        return horas;
    }

    @Override
    public List<Hora> compara(Date fecha) {
        LinkedList<Hora> horas = new LinkedList<Hora>();
        horas.add(new Hora("7:00","","Ocupado","","","Ocupado","",""));
        horas.add(new Hora("7:30","","Ocupado","","","Ocupado","Servicio Social",""));
        horas.add(new Hora("8:00","","Ocupado","Empalmado","","Ocupado","Servicio Social",""));
        horas.add(new Hora("8:30","","Ocupado","Empalmado","","Ocupado","Servicio Social",""));
        horas.add(new Hora("9:00","","Ocupado","Empalmado","","Ocupado","Servicio Social",""));
        horas.add(new Hora("9:30","","Ocupado","Empalmado","","Ocupado","Servicio Social",""));
        horas.add(new Hora("10:00","Administración de Proyectos de TI","Bases de Datos Avanzadas","Servicio Becario","Administración de Proyectos de TI","Bases de Datos Avanzadas","Servicio Social",""));
        horas.add(new Hora("10:30","Administración de Proyectos de TI","Bases de Datos Avanzadas","Servicio Becario","Administración de Proyectos de TI","Bases de Datos Avanzadas","Servicio Social",""));
        horas.add(new Hora("11:00","Administración de Proyectos de TI","Bases de Datos Avanzadas","","Administración de Proyectos de TI","Bases de Datos Avanzadas","Servicio Social",""));
        horas.add(new Hora("11:30","Servicio Becario","Servicio Becario","","Servicio Becario","Servicio Becario","Servicio Social",""));
        horas.add(new Hora("12:00","Servicio Becario","Servicio Becario","","Servicio Becario","Servicio Becario","",""));
        horas.add(new Hora("12:30","","","","","","",""));
        horas.add(new Hora("13:00","","","","","","",""));
        horas.add(new Hora("13:30","","","","","","",""));
        horas.add(new Hora("14:00","","","","Ocupado","","Ocupado",""));
        horas.add(new Hora("14:30","","Sistemas Inteligentes","","Ocupado","Sistemas Inteligentes","Ocupado",""));
        horas.add(new Hora("15:00","","Sistemas Inteligentes","","Ocupado","Sistemas Inteligentes","Ocupado",""));
        horas.add(new Hora("15:30","","Sistemas Inteligentes","","Ocupado","Sistemas Inteligentes","Ocupado",""));
        horas.add(new Hora("16:00","","Empalmado","Ocupado","Ocupado","Responsabilidad Social","Ocupado",""));
        horas.add(new Hora("16:30","","Empalmado","Ocupado","Ocupado","Responsabilidad Social","Ocupado",""));
        horas.add(new Hora("17:00","","Empalmado","Ocupado","Ocupado","Responsabilidad Social","Ocupado",""));
        horas.add(new Hora("17:30","","Ocupado","Ocupado","Ocupado","","Ocupado",""));
        horas.add(new Hora("18:00","","Ocupado","Ocupado","","","",""));
        horas.add(new Hora("18:30","","Ocupado","Ocupado","","","",""));
        horas.add(new Hora("19:00","","Ocupado","","Empalmado","","",""));
        horas.add(new Hora("19:30","","Ocupado","","Empalmado","","",""));
        horas.add(new Hora("20:00","","Ocupado","","Empalmado","","",""));
        horas.add(new Hora("20:30","","Ocupado","","Empalmado","","",""));
        horas.add(new Hora("21:00","","Ocupado","","Empalmado","","",""));
        horas.add(new Hora("21:30","","Ocupado","","Empalmado","","",""));
        horas.add(new Hora("22:00","","","","","","",""));
        return horas;
    }

    public List<Actividad> getActividadesInSpan(Date a, Date b, List<Actividad> l){
        List<Actividad> in = new LinkedList<Actividad>();
        return l;
    }

}
